import numpy as np

# 定义矩阵A和向量b
A = np.array([[3, 6, -5], [1, -3, 2], [5, -1, 4]])
b = np.array([12, -2, 10])

# 计算矩阵A的逆
A_inv = np.linalg.inv(A)

# 计算解向量x
x = np.dot(A_inv, b)

print("The solution is:\n", x)